
//-----------------------------------------------------------
// TABLE A10: Granting Access to Lobbying Firms (FULL RESULT)
//-----------------------------------------------------------

* House *

clear
use masterdata_house_fara.dta

gen ln_meansalary = ln(meansalary +1)
gen nolobstaff = numstaff - futurelob
gen femaleratio = numfemale/numstaff
gen int1 = futurelob*stafflobfirm 

macro define member_char1 "les majority dwnom1 budget chair subchr seniority maj_leader min_leader power membecamelob female afam latino state_leg south_dem"
macro define staff_char1 "futurelob int1 cstaff_lob nolobstaff ln_meansalary femaleratio"

replace primary_committee = upper(primary_committee)
gen mem_eco = 0
replace mem_eco = 1 if primary_committee == "APPROPRIATIONS"
replace mem_eco = 1 if primary_committee == "BUDGET"
gen mem_sec = 0
replace mem_sec = 1 if primary_committee == "ARMED SERVICES"
replace mem_sec = 1 if primary_committee == "HOMELAND SECURITY"
replace mem_sec = 1 if primary_committee == "HOMELAND SECURITY AND GOVERNMENTAL AFFAIRS"
gen mem_trd = 0
replace mem_trd = 1 if primary_committee == "ENERGY AND COMMERCE"
replace mem_trd = 1 if primary_committee == "WAYS AND MEANS"
replace mem_trd = 1 if primary_committee == "FINANCE"
gen mem_for = 0
replace mem_for = 1 if primary_committee == "FOREIGN AFFAIRS"
replace mem_for = 1 if primary_committee == "FOREIGN RELATIONS"

macro define committee "mem_eco mem_sec mem_trd mem_for"

gen totmeeting = nummeeting + numphone 

by primary_committee, sort: gen comid = 1 if _n == 1
replace comid = sum(comid) 

eststo clear
eststo: quietly areg totmeeting      $staff_char1 $member_char1  i.congress, a(comid) vce(cluster icpsr)
eststo: quietly areg nummemcontact   $staff_char1 $member_char1  i.congress, a(comid) vce(cluster icpsr)
eststo: quietly areg numstaffcontact $staff_char1 $member_char1  i.congress, a(comid) vce(cluster icpsr)
esttab, star(* 0.10 ** 0.05 *** 0.01) drop(*congress*) se ar2
